import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
kw = driver.find_element(By.ID,"kw")
print(kw)
print(kw.get_attribute("outerHTML"))

driver.quit()